package com.insideClass.TypeMessage;

import com.insideClass.typeinfo.Pet;
import com.insideClass.typeinfo.Pets;

/**
 * @author 13699
 */
public class PetCount4 {
    public static void main(String[] args) {
        TypeCounter counter=new TypeCounter(Pet.class);
        for (Pet pet:
                Pets.createArray(20)) {
            System.out.println(pet.getClass().getSimpleName()+" ");
            counter.count(pet);
        }
        System.out.println();
        System.out.println(counter);
    }
}
